<?php

require_once ($_SERVER['DOCUMENT_ROOT']."/config/phpwcms/conf.inc.php");

function get_bild($nr,$value,$width,$height) {

	$value = explode(":", $value);

	$bild = "<input name=\"cimage_name".$nr."\" type=\"text\" id=\"cimage_name".$nr."\" class=\"f11b\" style=\"\" value=\"".$value[0]."\" size=\"20\" maxlength=\"150\" onFocus=\"this.blur()\">&nbsp;\n";
	$bild .= "<a href=\"javascript:;\" title=\"Bildbrowser &ouml;ffnen\" onClick=\"tmt_winOpen('filebrowser_exd.php?nr=".$nr."','imageBrowser','width=380,height=300,left=8,top=8,scrollbars=yes,resizable=yes',1)\"><img src=\"img/open_image_button.gif\" width=\"20\" height=\"15\" border=\"0\"></a>&nbsp;\n";
	$bild .= "<a href=\"javascript:;\" alt=\"Gew&auml;hltes Bild entfernen\" onClick=\"document.art.cimage_name".$nr.".value='';document.art.cimage_id".$nr.".value='0';this.blur();return false;\"><img src=\"img/del_image_button.gif\" width=\"15\" height=\"15\" border=\"0\"></a>&nbsp;\n";
	$bild .= "".$width."&nbsp;<input name=\"cimage_x".$nr."\" type=\"text\" id=\"cimage_x".$nr."\" class=\"f11b\" value=\"".$value[2]."\" size=\"3\" maxlength=\"10\">&nbsp;\n";
	$bild .= "".$height."&nbsp;<input name=\"cimage_y".$nr."\" type=\"text\" id=\"cimage_y".$nr."\" class=\"f11b\" value=\"".$value[3]."\" size=\"3\" maxlength=\"10\">&nbsp;\n";
	$bild .= "<input name=\"cimage_id".$nr."\" type=\"hidden\" value=\"".$value[1]."\">\n";
		  return $bild;
	}

echo 'huhu';
?>
<script language="javascript" src="<? $_SERVER['DOCUMENT_ROOT']?> /include/inc_js/phpwcms.js" type="text/javascript"></script>


<form action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="post" name="art" id="art">
  <input type="hidden" name="id" value="<?php echo $values['id']; ?>" />
  <input type="hidden" name="catid" value="<?php echo $values['catid']; ?>" />
<input type="hidden" name="do" value="<?php echo $values['do']; ?>" />

<table border="0" cellpadding="0" cellspacing="0" width="510">
	<tr>
	<td>
<?
echo get_bild(0,$values['field1'],"width","height");
echo $values['id'];
?>
</td></tr></table></form>
